package ar.com.mooral.activities;

import android.app.Activity;
import android.content.ComponentName;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;
import android.widget.DatePicker;
import android.widget.EditText;
import android.widget.TextView;
import android.widget.TimePicker;
import ar.com.mooral.crohn.application.CrohnContext;


public class IngresoNota extends Activity {
    
	private EditText txtNota;
	
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.ingreso_nota);
        
        txtNota = (EditText)findViewById(R.id.txtIngresoNotaNota);
        txtNota.setText(CrohnContext.getPojo().getObservations());

        // RETORNO
    	Button btnIngresoNotaRetorno = (Button) findViewById(R.id.btnIngresoNotaRetorno);
    	btnIngresoNotaRetorno.setOnClickListener (new View.OnClickListener() {
		    public void onClick(View view) {
		    	finish();
		    }
		});
    	        
        
        // REGISTRAR
    	Button btnIngresoNotaGuardar = (Button) findViewById(R.id.btnIngresoNotaGuardar);
    	btnIngresoNotaGuardar.setOnClickListener (new View.OnClickListener() {
		    public void onClick(View view) {
		    	CrohnContext.getPojo().setObservations(txtNota.getText().toString());
				finish();
		    }
		});		
        
    }
}
